<?php
/**
 * 区域相关接口请求参数验证器
 * 发仔<i@fazi.me> 2018-07-09
 */
namespace app\open\validate;

use app\base\validate\BaseValidate;
class RoleValidate extends BaseValidate
{
    //验证
    protected $rule = [
        'role_id' =>  'require|integer',
        'area_id' =>  'require|integer',
        'role_name' =>  'require',
    ];

    // 默认值
    protected $default = [
    ];

    protected $message = [
    ];

    protected $scene = [
        'list' => [ 'fields', 'where_json'],
        'add' => [
            'area_id','role_name'
        ],
        'edit' => [
            'role_id','area_id', 'role_name'
        ],
    ];

}